package im.server;

import im.chattable.IChattable;
import im.chattable.impl.Client;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;

public class IMServer {
	public void run() throws IOException {
		
		List<IChattable> list = new ArrayList<>();
		
		ServerSocket server = new ServerSocket(2333);
		
		while(true) {
			Socket socket = server.accept();
			Client client = new Client("a", socket);
			list.add(client);
			
			new Thread(new IMClientRunnable(socket)).start();
		}
	}
}
